package com.dexilaonian.adpter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.dexilaonian.R;
import com.dexilaonian.bean.ConfirmStoreBean;
import java.util.List;


public class MangerAdapter extends RecyclerView.Adapter<MangerAdapter.ViewHolder>{

    private  Context mContext;
    private List<ConfirmStoreBean> mMangerList;

    public MangerAdapter(Context context, List<ConfirmStoreBean> mangerList) {
        mContext = context;
        mMangerList = mangerList;
    }

    @Override
    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = View.inflate(mContext, R.layout.manger_item, null);
        ViewHolder viewHolder = new ViewHolder(view);
        return viewHolder;
    }

    @Override
    public void onBindViewHolder(ViewHolder holder, int position) {
      //holder.mangerAddress.setText(mMangerList.get(position));
    }

    @Override
    public int getItemCount() {
        return mMangerList == null ? 0 :mMangerList.size();
    }

    public class ViewHolder extends RecyclerView.ViewHolder {

        private final TextView mangerName;
        private final TextView mangerAddress;
        private final TextView mangerPhone;
        private final TextView mangerEdit;
        private final TextView mangerDel;

        public ViewHolder(View itemView) {
            super(itemView);
            mangerName = (TextView) itemView.findViewById(R.id.manger_name);
            mangerAddress = (TextView) itemView.findViewById(R.id.manger_address);
            mangerPhone = (TextView) itemView.findViewById(R.id.manger_phone);
            mangerEdit = (TextView) itemView.findViewById(R.id.manger_edit);
            mangerDel = (TextView) itemView.findViewById(R.id.manger_del);
        }
    }
}
